forked from https://github.com/kashifrazzaqui/sslfacade, thanks the author!